<?php $this->load->view('layout/header'); ?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">商品管理</a></li>
            <li class="active"><a href="javascript:;">退款管理</a></li>
        </ul>
        <div class="product-view-area"><p>退款管理</p></div>
        <div class="order-search">
            <form class="form-horizontal" action="<?php echo site_url('tourismorderrefund/grid');?>" method="get">
                <div class="row">
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">退款搜索</label>
                            <div class="col-xs-7">
                                <input type="text" name="refund_search" value="<?php echo $this->input->get('refund_search');?>" class="form-control" placeholder="请输入退货编号或商品名称">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">申请时间</label>
                            <div class="col-xs-4">
                                 <input type="text" name="start_date" value="<?php echo $this->input->get('start_date');?>" id="start-date" class="form-control laydate-icon" placeholder="开始时间" onclick="laydate({elem:'#start-date',istime: true})">
                            </div>
                            <div class="col-xs-4">
                                <input type="text" name="end_date" value="<?php echo $this->input->get('end_date');?>" id="end-date" class="form-control laydate-icon" placeholder="结束时间" onclick="laydate({elem:'#end-date',istime: true})">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row search-button">
                    <div class="col-lg-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"> </label>
                            <div class="col-xs-7">
                                <button type="submit" class="btn btn-warning">搜索</button>
                                <a href="<?php echo site_url('tourismorderrefund/grid');?>" class="btn btn-default">清除条件</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="tourism-order-refund">
            <div class="order-dan">
                <ul class="order-httList">
                    <li class="active"><a href="<?php echo site_url('tourismorderrefund/grid') ?>">退款管理</a></li>
                    <li><a href="<?php echo site_url('tourismorderexchange/grid')?>">换货管理</a></li>
                </ul>
            </div>
            <?php if($list->num_rows() > 0) : ?>
                <table class="table">
                    <thead>
                        <tr>
                            <th>商品名称</th>
                            <th>买家电话</th>
                            <th>退还数量</th>
                            <th>销售价/供应价</th>
                            <th>退款金额</th>
                            <th>审核状态</th>
                            <th>进度</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <?php foreach($list->result() as $item) :?>
                    <tbody>
                        <tr class="tourism-show-title">
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" name="sub" class="checkbox-sub">退货编号：<?php echo $item->refund_id?>
                                    </label>
                                </div>
                            </td>
                            <td colspan="6"><p class="text"><?php echo $item->created_at ?> 申请人：<?php echo $item->user_name?></p></td>
                        </tr>
                        <tr>
                            <td class="baobei">
                                <div class="media">
                                    <div class="media-left">
                                        <a target="_blank" href="<?php echo $this->config->wap_base_url.'tourismgoods/info/'.$item->goods_attr_id.'.html' ?>">
                                            <img class="media-object lazy" src="skins/images/load.jpg" data-original="<?php echo $this->config->show_image_url($item->goods_image, '300-300') ?>">
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <h4 class="media-heading"><?php echo $item->goods_name ?></h4>
                                        <span><?php echo $item->attribute_value ?></span>
                                    </div>
                                </div>
                            </td>
                            <td><?php echo $item->cellphone?></td>
                            <td><?php echo $item->number?></td>
                            <td><?php echo $item->shop_price.' / '.$item->supply_price;?></td>
                            <td class="price">
                                <div class="text-primary">￥<?php echo bcmul($item->number, $item->supply_price, 2) ?></div>
                                <span>(手续费:<?php echo '￥'.$item->counter_fee?>)</span>
                            </td>
                            <td><strong class="text-danger"><?php echo $status[$item->status]?></strong></td>
                            <td><strong class="text-danger"><?php echo $state[$item->flag]?></strong></td>
                            <td><a href="<?php echo site_url('tourismorderrefund/examine/'.$item->refund_id)?>" >　详情　</a></td>
                        </tr>
                    </tbody>
                    <?php endforeach; ?>
                </table>
                <nav><?php echo $pg_link;?></nav>
            <?php else: ?>
                <div class="none-data">暂无数据</div>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer'); ?>